import Cookies from 'js-cookie'

const TokenKey = 'Token'

export function setLoginType(loginType) {
  return Cookies.set('LoginType', loginType)
}

export function getLoginType() {
  return Cookies.get('LoginType')
}

export function removeLoginType() {
  return Cookies.remove('LoginType')
}

// 设置token
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getEnterpriseType() {
  return Cookies.get('EnterpriseType')
}

export function setEnterpriseType(EnterpriseType) {
  return Cookies.set('EnterpriseType', EnterpriseType)
}

export function removeEnterpriseType() {
  return Cookies.remove('EnterpriseType')
}

// 设置当前项目id
export function getProId() {
  return Cookies.get('proId')
}

export function setProId(proId) {
  return Cookies.set('proId', proId)
}

export function removeProId() {
  return Cookies.remove('proId')
}

// 设置当前勘探点id
export function getExplorationId() {
  return Cookies.get('explorationId')
}

export function setExplorationId(proId) {
  return Cookies.set('explorationId', proId)
}

export function removeExplorationId() {
  return Cookies.remove('explorationId')
}

// 设置当前项目状态
export function getProStatus() {
  return Cookies.get('proStatus')
}

export function setProStatus(proId) {
  return Cookies.set('proStatus', proId)
}

export function removeProStatus() {
  return Cookies.remove('proStatus')
}
